<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>修改Promise对象的状态</title>
</head>
<body>
<script>
    let promise = new Promise((resolve, reject) => {
        //回调函数中如果为空  对象的状态为pending(等待状态发生改变)

        resolve('ok')// 将状态修改为成功(fulfilled)

        reject('err')// 将状态修改为失败(rejected)

        throw '异常'//将状态修改为异常
    })
    console.log(promise)
</script>
</body>
</html>